package com.claimSettlement.service;

import com.claimSettlement.pojo.*;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * 查勘与定损openfeign接口
 * 曹文韬
 */
@FeignClient(value = "cloud-config-prodam",path = "/surveyLoss")
public interface SurveyLossOpenFeginService {

    @RequestMapping("/getSurveyLossIdOrCarframeId")
    PageInfo<SurveyLoss> getSurveyLossIdOrCarframeId(@RequestParam("id") int id,@RequestParam("carframeId") String carframeId,@RequestParam("page") int page);

    @RequestMapping(value = "/insSurveyLoss", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String insSurveyLoss(@RequestBody SurveyLoss surveyLoss);

    @RequestMapping(value = "/delSurveyLoss",produces = "text/html;charset=UTF-8")
    String delSurveyLoss(@RequestParam("caseId") String caseId);

    @RequestMapping(value = "/updSurveyLossProspectState", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String updSurveyLossProspectState(@RequestBody SurveyLoss surveyLoss);

    @RequestMapping(value = "/insLossDetermination", method = RequestMethod.POST)
    int insLossDetermination(@RequestBody LossDetermination lossDetermination);

    @RequestMapping("/getLossDeterminationByUserId")
    LossDetermination getLossDeterminationByUserId(@RequestParam("caseId") String caseId);

    @RequestMapping("/uploadImgs")
    String uploadImgs(@RequestBody Map<String, MultipartFile> map);

    @RequestMapping("/updateLossState")
    public Integer updateLossState(@RequestBody Map<String, Object> map);

    @RequestMapping(value = "/delLossDetermination",produces = "text/html;charset=UTF-8")
    String delLossDetermination(@RequestParam("caseId") String caseId);

    @RequestMapping(value = "/updLossDetermination", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String updLossDetermination(@RequestBody LossDetermination lossDetermination);

    /*@RequestMapping(value = "/uploadImgs", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String uploadImgs(@RequestParam("uploadimg") MultipartFile uploadimg);*/

    @RequestMapping(value = "/updSurveyLossSettUserId", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String updSurveyLossSettUserId(@RequestBody SurveyLoss surveyLoss);

    @RequestMapping(value = "/insCheLoss", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String insCheLoss(@RequestBody CheLoss cheLoss);

    @RequestMapping(value = "/insWuLoss", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String insWuLoss(@RequestBody WuLoss wuLoss);

    @RequestMapping(value = "/insRenLoss", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String insRenLoss(@RequestBody RenLoss renLoss);

    @RequestMapping("/getCheLoss")
    List<CheLoss> getCheLoss(@RequestParam("caseId") String caseId);

    @RequestMapping("/getWuLoss")
    List<WuLoss> getWuLoss(@RequestParam("caseId") String caseId);

    @RequestMapping("/getRenLoss")
    List<RenLoss> getRenLoss(@RequestParam("caseId") String caseId);

    @RequestMapping(value = "/updCheLoss", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String updCheLoss(@RequestBody CheLoss cheLoss);

    @RequestMapping(value = "/updWuLoss", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String updWuLoss(@RequestBody WuLoss wuLoss);

    @RequestMapping(value = "/updRenLoss", method = RequestMethod.POST,produces = "text/html;charset=UTF-8")
    String updRenLoss(@RequestBody RenLoss renLoss);

    @RequestMapping("/getLossDataAll")
    List<LossDetermination> getLossDataAll();
}
